package CSS::Builder::Selector::Sibling;
use Moose;

with 'CSS::Builder::Roles::List';

# Adjacent sibling selectors have the following syntax: E1 + E2,
# where E2 is the subject of the selector.
# The selector matches if E1 and E2 share the same parent in the document tree
# and E1 immediately precedes E2.
# H1.opener + H2 { margin-top: -5mm } 
has 'sibling'       => ( isa => 'Any' , is => 'rw');


sub css {
      my $self = shift;
      
      my $selectors = $self->list;
      my @res = map { $self->docss($_) } @$selectors;
      
      return join " + " , @res; 
}


1;